<script type="text/javascript" src="./script/category.js"></script>
<div style="margin-left: 0px;
    width: 960px;
    display: inline-block;
    min-height: 500px;
    bottom: 0;
    ">
    <div style="display: block;" id="_main-content-page">
        <div class="detail-dialog unH" style="text-align: center;width: 960px;height: auto">
            <div class="dialog-close-button id-detail-dialog-close-button hidden">
                <div class="dialog-close-x"></div>
            </div>
            <div class="detail-dialog-header" style="height: 82px;width: 960px;background: #EEE;">
                <div class="detail-dialog-header" style="width: 100%">
                    <div class="detail-dialog-header-block" style="height: auto;padding: 0 0 0 2px">
                        <div class="title-tag-item-detail" style="width: 940px">
                            <h1 style="line-height: 78px">Category</h1>
                        </div>
                    </div>
                </div>
            </div>
            <div class="detail-dialog-body" style="width: 960px;height: auto">
                <div class="detail-dialog-tab-pane" style="width: 960px;height: auto">
                    <div class="goog-tab-content ">
                        <div class="detail-dialog-tab-content id-detail-dialog-contact-tab-content">
                            <div style="padding: 0px 0" class="">
<?
if($_SESSION[ "authority"]!="admin" && false){
   include "../NIV/checkauthority.php"; 
}else{
    include 'Module/CategoryModule.php';
    $module=new CategoryModule();
    $item=$module->get($_REQUEST["id"]);
?>
<!--<table class="table-data" style="width: 960px;margin-top: 0px">
    <tr class="id-head-row inew">
        <td colspan="6">
            <a class="" href="?Unit=08_category_detail">
                <div class="new pt12 pb12">++ New</div>
            </a>
        </td>
    </tr>

</table>-->     
                                <input type="hidden" id="txt_category_id" placeholder="" value="<?=$item["id"]?>"/>
                                <div class="grid_12">
                                    <div class="pl12 pr12 pt4 pb4">
                                        <div class="_input-label">
                                            <div class="input">
                                                <input type="text" id="txt_category_name" placeholder="" value="<?=$item["name"]?>"/>
                                                <div class="label"><label>Name</label></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="grid_12">
                                    <div class="pl12 pr12 pt4 pb4">
                                        <div class="_input-label" type="select">
                                        <div class="input" type="select">
                                            <div class="select">
                                                <select id="cbx_category_type">
                                                    <optgroup  label="Choose Type">
                                                        <option <?=$item["type"]=="New"?"selected=1":""?> value="New">New</option>
                                                        <option <?=$item["type"]=="Product"?"selected=1":""?> value="Product">Product</option>
                                                        <option <?=$item["type"]=="About"?"selected=1":""?> value="About">About</option>
                                                        <option <?=$item["type"]=="Other"?"selected=1":""?> value="Other">Other</option>
                                                    </optgroup>
                                                </select>
                                            </div>
                                            <div class="label"><label>Type</label></div>
                                        </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="grid_12">
                                    <div class="pl12 pr12 pt4 pb4">
                                        <div class="_input-label">
                                            <div class="input">
                                                <input type="text" disabled="1" id="txt_category_insert" placeholder="" value="<?=$item["insert"]?>"/>
                                                <div class="label"><label>Insert</label></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="grid_12">
                                    <div class="pl12 pr12 pt4 pb4">
                                        <div class="_input-label">
                                            <div class="input">
                                                <input type="text" disabled="1" id="txt_category_update" placeholder="" value="<?=$item["update"]?>"/>
                                                <div class="label"><label>Update</label></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="grid_6 prefix_9 suffix_9 ">
<!--                                    <div class="mybutton icon tooltip<?=isset($item["delete"])?" disable":""?>" 
                                        title="Save"
                                        onclick="<?=isset($item["delete"])?"":(isset($id)?"update();":"save();")?>"
                                        ><div><img src="./images/icon/media_floppy_green.png"/><span>Save</span></div>
                                    </div>
                                    <div class="mybutton icon tooltip<?=isset($item["delete"])?" disable":""?>" 
                                        title="Cancel"
                                        ><div><img src="./images/icon/media_floppy_green.png"/><span>Cancel</span></div>
                                    </div>-->
                                    <div class="_buttonr _button-green _btnfix hover50 " id="_btn_category_save"
                                         onclick="<?=$item["delete"]?"":(isset($item["id"])?"updateCategory();":"insertCategory();")?>"
                                         ><span>Save</span></div>
                                    <a href="?Unit=07_category" class="_buttonr _button-black _btnfix " id="_btn_category_cancel">
                                        <span>Cancel</span>
                                    </a>
                                    
                                </div>
                                <div class="clear"></div>
                                <div class="gird_24">
                                    <div class="pl12 pr12 pt4 pb4">
                                        <div class="ata-asE tac category_notice">
                                            thông báo
                                        </div>
                                    </div>
                                </div>
                                
<?                              
}
?>
<div class="clear"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>                  
    </div>
</div>
